<!DOCTYPE html>
<html>
    <head>
        <? require_once 'header.php'; ?>
    </head>
    <body>
        <?php
        getNavbar();
        ?>
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
                var js, fjs = d.getElementsByTagName(s)[0];
                if (d.getElementById(id))
                    return;
                js = d.createElement(s);
                js.id = id;
                js.src = "//connect.facebook.net/pt_BR/all.js#xfbml=1";
                fjs.parentNode.insertBefore(js, fjs);
            }(document, 'script', 'facebook-jssdk'));</script>

        <div class="container-fluid">
            <div class="row-fluid" style="margin-top: 40px;">
                <h1 align="center"><? echo $this->getEmpresa()->getNome(); ?></h1>
            </div>
            <div class="row-fluid">
                <div class="span3">
                    <div class="navbar">
                        <div class="navbar-inner">
                            <a class="brand" href="">Perfil</a>
                        </div>
                        <div class="container well">
                            <h3 style="margin: 0px;"><?php echo $this->getEmpresa()->getNome(); ?></h3>
                            <?
                            $this->getImagensEmpresa($this->getEmpresa());
                            ?>

                            <p>
                            <address>
                                <strong><?php echo $this->getEmpresa()->getNome(); ?></strong><br>
                                <?php echo $this->getEmpresa()->getEndereco()->getDescricao(); ?><br>
                                <?php echo $this->getEmpresa()->getCidade()->getNome() . ", " . $this->getEmpresa()->getCidade()->getEstado()->getNome() . "." ?><br>
                                <abbr title="Telefone">Tel:</abbr> (123) 456-7890<br>
                                <a href="mailto:#"><? echo $this->getEmpresa()->getEmail(); ?></a>
                                <div class="fb-like" data-href="http://tudohoje.com.br/" data-width="250" data-show-faces="true" data-send="true"></div>        
                            </address>
                            </p>
                        </div>

                    </div>
                </div>
                <div class="span9">
                    <div class="navbar">
                        <div class="navbar-inner">
                            <ul class="nav">
                                <?
                                if ($univesitario = $this->isUniversitario()) {
                                    ?>
                                    <li class="active"><a href="#noticias" data-toggle="tab"><i class="icon-home"></i>Noticias</a></li>
                                    <li><a href="#eventos" data-toggle="tab"><i class="icon-glass"></i>Eventos</a></li>
                                    <?
                                } else {
                                    ?>
                                    <li class="active"><a href="#eventos" data-toggle="tab"><i class="icon-glass"></i>Eventos</a></li>
                                    <li><a href="#cardapio" data-toggle="tab"><i class="icon-list-alt"></i>Cardapio</a></li>
                                    <li><a href="#reservas" data-toggle="tab"><i class="icon-calendar"></i>Reservas</a></li>
                                    <?
                                }
                                ?>
                                <li><a href="#localizacao" data-toggle="tab"><i class="icon-map-marker"></i>Localização</a></li>
                                
                            </ul>
                        </div>
                        <div class="container well">
                            <div class="tab-content">

                                <div class="tab-pane <? if(!$univesitario) echo "active"; ?>" id="eventos">
                                    <? $this->getMeusEventosForUsers($this->getEmpresa()); ?>
                                </div>

                                <div class="tab-pane" id="cardapio">
                                        <? $this->getCardapio(); ?>
                                </div>

                                <div class="tab-pane" id="localizacao">
                                    <div class="alert-error">
                                        Localização não disponivel.
                                    </div>
                                </div>

                                <div class="tab-pane" id="reservas">
                                    <div class="alert-error">
                                        Não é permitidos fazer reservas nesta empresa.
                                    </div>
                                </div>

                                <div class="tab-pane <? if($univesitario) echo "active"; ?>" id="noticias">
                                    <?
                                    $this->getNoticias();
                                    ?>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!--                <div class="span3">
                                    <div class="navbar">
                                        <div class="navbar-inner">
                                            <a class="brand" href="">Principais noticias</a>
                                        </div>
                                        <div class="container well">
                                            <ul class="nav unstyled">
                                                <li class="span12"><a href="" style="padding: 0px;"><h4>Gincalouros</h4></a></li>
                                                <li class="span12"><a href="" style="padding: 0px;"><h4>Cara Cade Minha Casa?</h4></a></li>
                                                <li class="span12"><a href="" style="padding: 0px;"><h4>Novo R.U</h4></a></li>
                                                <li class="span12"><a href="" style="padding: 0px;"><h4>Outra Noticia importante</h4></a></li>
                                            </ul>
                                        </div>
                                        <div class="navbar-inner">
                                            <a class="brand" href="">Amigos que curtiram a empresa</a>
                                        </div>
                                        <div class="container well">
                                            <iframe src="http://www.facebook.com/plugins/like.php?href=www.tudohoje.com.br"
                                                    scrolling="no" frameborder="0"
                                                    style="border:none; width:450px; height:80px"></iframe>
                                        </div>
                                    </div>
                                </div>-->
            </div>
        </div>
        <?
        require_once 'footer.php';
        ?>
    </body>
</html>
